//
//  UsingGuideController.m
//  QRMaster
//
//  Created by lc on 16/6/8.
//  Copyright © 2016年 myApple. All rights reserved.
//

#import "UsingGuideController.h"

@interface UsingGuideController ()<UIWebViewDelegate>
{
    UIWebView * guideWebView;
}
@end

@implementation UsingGuideController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = NSLocalizedString(@"mineGuide", nil);
    [self prepareWebView];
}

- (void)prepareWebView{
    guideWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, UI_SCREEN_HEIGHT-64)];
    guideWebView.dataDetectorTypes = UIDataDetectorTypeAll;
    guideWebView.delegate = self;
    [guideWebView setScalesPageToFit:YES];
    NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://qrm.uclbrt.com"]];
    [guideWebView loadRequest:request];
    [self.view addSubview:guideWebView];
}

- (void)webViewDidStartLoad:(UIWebView *)webView{
    [self startWaiting:nil color:nil addToView:self.view];
}

- (void)webViewDidFinishLoad:(UIWebView *)webView{
    [self stopWaiting];
}


- (void)webView:(UIWebView *)webView didFailLoadWithError:(nullable NSError *)error{
    [self stopWaiting];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
